#ifndef CONNECT_SETUP_H
#define CONNECT_SETUP_H

#include <QWidget>
#include<QtSerialPort/QSerialPort>//提供访问串口功能
#include<QtSerialPort/QSerialPortInfo>//提供系统中存在的串口信息
#include"myserver.h"
#include"tcpclientsocket.h"

namespace Ui {
class Connect_Setup;
}

class Connect_Setup : public QWidget
{
    Q_OBJECT

public:
    explicit Connect_Setup(QWidget *parent = nullptr);
    ~Connect_Setup();
    void BaudRate_init();
    void DataBits_init();
    void CheckBit_init();
    void StopBit_init();
    void Severip_init();
    void Port_init();
    void AgreementType_init();

    void SerialPort_init();
    void set_init();
    QString get_comboBox_Clientip();
    QSerialPort* serial;//定义全局的串口对象
    MyServer* myserver;//定义全局的server对象
public slots:
    void open_serialport();
    void receive_socketname(QString);//接收套接字名称
signals:
    void send_currentindex(int);
private:
    Ui::Connect_Setup *ui;


};

#endif // CONNECT_SETUP_H
